package com.design.pattern.structural.proxy;

/**
 * @Author hanyuanlai
 * @Date 2022/7/17
 */
public class TimeProxy implements Movalbe{
    private Movalbe movalbe;

    public TimeProxy(Movalbe movalbe) {
        this.movalbe = movalbe;
    }

    @Override
    public void move() {
        long start = System.currentTimeMillis();
        movalbe.move();
        System.out.println("耗时:"+(System.currentTimeMillis() - start));
    }

}
